package edu.kjxy.day02Synchronized.synLockIn_2;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 20:07
 */
public class Sub extends Main {
    synchronized public void operateIMainMethod() {
        try {
            while (i > 0) {
                i--;
                System.out.println("sub print i=" + i);
                Thread.sleep(100);
                super.operateIMainMethod();
            }
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
